package com.caishi.lkx.user.service;

import com.caishi.lkx.user.model.ActionModel;
import com.caishi.lkx.user.model.ActionRoleModel;
import com.zzw.common.entity.BaseService;
import com.zzw.common.service.NameService;

import com.caishi.lkx.user.model.re.UserRoleReModel;

import java.util.List;

/**
 * @author by keray
 * date:2021/4/13 9:40 上午
 */
public interface IActionRoleService extends BaseService<ActionRoleModel, String>, NameService<ActionRoleModel, String> {

    ActionRoleModel code2Role(String code);

    List<ActionRoleModel> selectUserRoles(String userId);

    int selectUserMaxRoleLevel(String userId);

    List<ActionModel> selectUserAction(String userId);


    List<String> selectUserActionCode(String userId);

    void addAction(String roleCode, List<String> actionCodes);

    List<ActionModel> roleAction(String roleCode);

    Integer roleHaveActionCount(String roleCode);

    List<String> roleActionCodes(String roleCode);


    /**
     *<p>
     *   <h3>作者 keray</h3>
     *   <h3>时间： 2021/4/12 1:42 下午</h3>
     *   修改用户接口职位
     *</p>
     * @param userId
     * @return <p> {@link } </p>
     * @throws
     */
    void userSettingRoles(String userId, List<UserRoleReModel> roleReModels);

    void userSettingRolesByIds(String userId, List<String> roleIds);

    /**
     *<p>
     *   <h3>作者 keray</h3>
     *   <h3>时间： 2021/4/12 1:42 下午</h3>
     *   获取用户接口role值
     *</p>
     * @param userId
     * @return <p> {@link String} </p>
     * @throws
     */
    String apiRoleName(String userId);

    void trantest();
}
